#ifndef FUSIONLAYERS_H
#define FUSIONLAYERS_H

#include "Layer/layer.h"
#include <list>

enum e_fusion{
    ResizeToUnionLayers,
    SizeImage,
    CropToIntersectionLayers
};

class FusionLayers{

public:
    //************************************************************* Constructor
    FusionLayers(enum e_fusion, int widthImage, int heightImage);
    FusionLayers(int widthImage, int heightImage);
    //************************************************************* Fusion
    Layer* fusion(std::list <Layer*> listLayerToFusion);
void fusionnerFitToLayer(QImage* image, Layer* layerFusion,int xImage, int yImage);
private :
    //************************************************************* Type Fusion
    Layer* fusionnerUnion(std::list<Layer*> listLayerToFusion);
    Layer* fusionnerFitSizeImage(std::list<Layer*> listLayerToFusion);
    Layer* fusionnerIntersection(std::list<Layer*> listLayerToFusion);

    //************************************************************* Variables
    e_fusion state;
    int xPosFusion, yPosFusion;
    int xEndFusion, yEndFusion;
    int widthImage;
    int heightImage;
    Layer *layerFusion;
};

#endif // FUSIONLAYERS_H
